package com.atguigu.classes;

/**
 * @program: IDEAcode
 * @description:
 * @author: Mr.zjx
 * create: 2021-07-22-14-57
 **/
public class Test {
    public static void main(String[] args) {
        String str = "a b  c dgf     ioaof";
        String[] array = str.split(" +");//空格出现一次或者多次
        for (int i = 0;i < array.length; i++){
            System.out.println(array[i]);
        }
    }
}
